<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //禁止对象的扩展
    var obj ={
        a:"a",
        b:"b"
    }
    obj.c = "c";
    Object.preventExtensions(obj);
    obj.d = "d";
    console.log(obj);
</script>
</html>